package com.kuaidi100.sdk.response.internationalshipment;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * @Author: ligl
 * @Date: 2021-08-09 17:27
 */
public class ShipmentResp {
    /**
     * 快递单号
     */
    private String kuaidinum;
    /**
     * 面单信息对象
     */
    private Document label;
    /**
     * 发票对象信息
     */
    private Document invoice;
    /**
     * 包裹号,多个包裹号用英文逗号分隔
     */
    private String pkgNums;
    /**
     * 子单号,多个包裹用英文逗号分隔
     */
    private String subNums;

    @Override
    public String toString() {
        try {
            ObjectMapper objectMapper = new ObjectMapper();
            return objectMapper.writeValueAsString(this);
        } catch (Exception e) {
            return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                    .append("kuaidinum", kuaidinum)
                    .append("label", label)
                    .append("invoice", invoice)
                    .append("pkgNums", pkgNums)
                    .append("subNums", subNums)
                    .toString();
        }
    }

    public String getKuaidinum() {
        return kuaidinum;
    }

    public void setKuaidinum(String kuaidinum) {
        this.kuaidinum = kuaidinum;
    }

    public Document getLabel() {
        return label;
    }

    public void setLabel(Document label) {
        this.label = label;
    }

    public Document getInvoice() {
        return invoice;
    }

    public void setInvoice(Document invoice) {
        this.invoice = invoice;
    }

    public String getPkgNums() {
        return pkgNums;
    }

    public void setPkgNums(String pkgNums) {
        this.pkgNums = pkgNums;
    }

    public String getSubNums() {
        return subNums;
    }

    public void setSubNums(String subNums) {
        this.subNums = subNums;
    }
}
